package br.com.marcelo.reservasis.domain.model;

import br.com.aroeirasoftware.gwtcomponents.domain.models.ASBaseEntity;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author Kirmaier
 */
@Entity
@Table(name = "Endereco")
//@NamedQueries({@NamedQuery(name = "Endereco.findAll", query = "SELECT e FROM Endereco e"), @NamedQuery(name = "Endereco.findByIdendereco", query = "SELECT e FROM Endereco e WHERE e.idendereco = :idendereco"), @NamedQuery(name = "Endereco.findByLogradouro", query = "SELECT e FROM Endereco e WHERE e.logradouro = :logradouro"), @NamedQuery(name = "Endereco.findByNumero", query = "SELECT e FROM Endereco e WHERE e.numero = :numero"), @NamedQuery(name = "Endereco.findByCep", query = "SELECT e FROM Endereco e WHERE e.cep = :cep"), @NamedQuery(name = "Endereco.findByHospede", query = "SELECT e FROM Endereco e WHERE e.hospede = :hospede"), @NamedQuery(name = "Endereco.findByTelefone", query = "SELECT e FROM Endereco e WHERE e.telefone = :telefone"), @NamedQuery(name = "Endereco.findByMunicipio", query = "SELECT e FROM Endereco e WHERE e.municipio = :municipio")})
public class Endereco extends ASBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "Id_endereco")
    private Integer idendereco;
    @Column(name = "Logradouro")
    private String logradouro;
    @Column(name = "Numero")
    private String numero;
    @Column(name = "Cep")
    private String cep;
    @Column(name = "Hospede")
    private Integer hospede;
    @Column(name = "Telefone")
    private String telefone;
    @Column(name = "Municipio")
    private Integer municipio;

    public Endereco() {
    }

    public Endereco(Integer idendereco) {
        this.idendereco = idendereco;
    }

    public Integer getIdendereco() {
        return idendereco;
    }

    public void setIdendereco(Integer idendereco) {
        this.idendereco = idendereco;
    }

    public String getLogradouro() {
        return logradouro;
    }

    public void setLogradouro(String logradouro) {
        this.logradouro = logradouro;
    }

    public String getNumero() {
        return numero;
    }

    public void setNumero(String numero) {
        this.numero = numero;
    }

    public String getCep() {
        return cep;
    }

    public void setCep(String cep) {
        this.cep = cep;
    }

    public Integer getHospede() {
        return hospede;
    }

    public void setHospede(Integer hospede) {
        this.hospede = hospede;
    }

    public String getTelefone() {
        return telefone;
    }

    public void setTelefone(String telefone) {
        this.telefone = telefone;
    }

    public Integer getMunicipio() {
        return municipio;
    }

    public void setMunicipio(Integer municipio) {
        this.municipio = municipio;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idendereco != null ? idendereco.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Endereco)) {
            return false;
        }
        Endereco other = (Endereco) object;
        if ((this.idendereco == null && other.idendereco != null) || (this.idendereco != null && !this.idendereco.equals(other.idendereco))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.reservasis.Endereco[idendereco=" + idendereco + "]";
    }

}
